﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PSE.Framework.Communication.Adapters
{
    /// <summary>
    /// Argumento do evento ReceiveError
    /// </summary>
    public class MessageReceivedErrorEventArgs : EventArgs
    {
        /// <summary>
        /// Construtor que preenche Exception
        /// </summary>
        /// <param name="exception">Exception com o erro de recebimento</param>
        public MessageReceivedErrorEventArgs(Exception exception)
        {
            if (exception == null)
                throw new ArgumentNullException("exception");

            _exception = exception;
        }

        private Exception _exception = null;
        /// <summary>
        /// Exception com o erro de recebimento
        /// </summary>
        public Exception Exception
        {
            get { return _exception; }
        }
    }
}
